# -*- coding: utf-8 -*- 

import time,wx
import settings,main
from utility import *

class FRApp(wx.App):

    def OnInit(self):
        
        image = wx.Image('splash.jpg')
        bmp = image.ConvertToBitmap()
        wx.SplashScreen(bmp, wx.SPLASH_TIMEOUT|wx.CENTER_ON_SCREEN, 
                        settings.show_time*1000 ,  None, -1)
        
        wx.Yield()# ? 
        
        time.sleep(settings.show_time - 0.1) 
        
        detect()
        #print settings.screenHeight, settings.screenWidth
    
        f = main.MainFrame()
        f.Show(True)
        self.SetTopWindow(f)
        
        return True

if __name__ ==  '__main__' :
    app = FRApp(False)
    app.MainLoop()
